*================================================================================*
! Long-term results of cutting thickened secondary anterior mitral leaflet       !
! chordae in association with myectomy in obstructive hypertrophic               !
! cardiomyopathy                                                                 !
!                                                                                !
! Paolo Ferrazzi, MD, Paolo Spirito, MD, Luca Boni, MD                           !
!                                                                                !
! Data import                                                                    !
*--------------------------------------------------------------------------------*
! Version 1.0 of 5-JAN-2026                                                      !
!--------------------------------------------------------------------------------!
! Changelog                                                                      !
! Version 1.0 -------------------------------------------------------------------!
! - Initial release                                                              !
*================================================================================*;

proc format;
   value reason (notsorted) 
      1 = 'Yes'
      2 = 'No, no chordal cutting'
      3 = 'No, chordal cutting and MV replacement'
      4 = 'No, MV replacement only';
   value $sex (notsorted)  
      'M' = 'Male'
      'F' = 'Female';
   value noyes (notsorted) 
      0 = 'No'
      1 = 'Yes'
     -8 = 'Not applicable'
     -9 = 'Missing value';
   value nyha (notsorted) 
      1 = 'NYHA I'
      2 = 'NYHA II'
      3 = 'NYHA III'
      4 = 'NYHA IV'
     -8 = 'Not applicable'
     -9 = 'Missing value';
   value mv_reg (notsorted) 
      0 = 'None'
      1 = 'Mild'
      2 = 'Moderate'
      3 = 'Moderate-to-severe'
      4 = 'Severe'
     -8 = 'Not applicable'
     -9 = 'Missing value';
   value tfu (notsorted)
      0 = 'Not available'
      1 = 'Only clinic'
      3 = 'Clinic and instrumental'
     -8 = 'Not applicable';
   value t_surg (notsorted)
      0 = 'No operation'
      1 = 'Mitral valve replacement'
      2 = 'Aortic valve replacement'
      3 = 'Mitral and aortic valves replacement'
      4 = 'Left ventricle pseudoaneurysm'
      5 = 'Hearth transplant'
     -8 = 'Not applicable';
   value status (notsorted) 
      0 = 'Alive'
      1 = 'Dead'
     -8 = 'Not applicable';
run;

proc import out=hcm datafile= "clinical-dataset-v-1-0-2026-01-05.csv" dbms=csv replace;
   getnames=yes;
   datarow=2; 
run;

data hcm;
   set hcm;
   *;
   label
       v1='Eligibility'
       v2='Age at surgery (yrs)'
       v3='Sex'
       v4='Pre-operative NYHA class'
       v5='Pre-operative history of atrial fibrillation'
       v6='Pre-operative ejection fraction (%)'
       v7='Pre-operative maximal septal thickness (mm)'
       v8='Pre-operative maximal LVOT gradient at rest (mmHg)'
       v9='Pre-operative mitral valve regurgitation'
      v10='Pre-operative pacemaker'
      v11='Pre-operative ICD'
      v12='Anterior septum single piece myectomy'
      v13='Posterior septum myectomy'
      v14='Papillary muscle mobilization'
      v15='Transaortic secondary chordal cutting'
      v16='Plication of free margin of ant. or post. mitral leaflet'
      v17='Mitral valve replacement'
      v18='Associated aortic valve repair'
      v19='Associated aortic valve replacement'
      v20='Associated coronary artery bypass graft'
      v21='Perioperative pacemaker'
      v22='Perioperative death'
      v23='Maximal septal thickness at discharge (mm)'
      v24='Maximal LVOT gradient at rest at discharge (mmHg)'
      v25='Mitral valve regurgitation at discharge'
      v26='Hiatrogenic septal defect at discharge'
      v27='Type of follow-up'
      v28='NYHA class at last follow-up control'
      v29='Recurrent or permanent AF at last follow-up control'
      v30='Ejection fraction at last follow-up visit (%)'
      v31='Maximal septal thickness at last follow-up visit (mm)'
      v32='Maximal LVOT gradient at rest at last follow-up visit (mmHg)'
      v33='Mitral valve regurgitation at last follow-up visit'
      v34='Second HCM-related surgical operation during follow-up'
      v35='Duration of follow-up (yrs)'
      v36='Status at last follow-up control';
   *;
   format
       v1 reason.
       v3 $sex.
       v4 nyha.
       v5 noyes.
       v9 mv_reg.
      v10 noyes.
      v11 noyes.
      v12 noyes.
      v13 noyes.
      v14 noyes.
      v15 noyes.
      v16 noyes.
      v17 noyes.
      v18 noyes.
      v19 noyes.
      v20 noyes.
      v21 noyes.
      v22 noyes.
      v25 mv_reg.
      v26 noyes.
      v27 tfu.
      v28 nyha.
      v29 noyes.
      v33 mv_reg.
      v34 t_surg.
      v36 status.;
   *;  
run;
